package cn.xerllent.wxtp.service.dto;

import lombok.Data;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;

import java.time.LocalDate;

import org.springframework.format.annotation.DateTimeFormat;

@Data
@Accessors(chain = true)
public class DksbFilter {

	private Long id;

	private String corpId;

	private String reqUserid;

	private String blurry;

	private Integer status;

	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private LocalDate createtimeFrom;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private LocalDate createtimeTo;

	// 子表属性
	private String srcUserid;
	private String tarUserid;

	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private LocalDate eventdateFrom;
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private LocalDate eventdateTo;

	private String grade;
	private String clasz;
	private String subject;
	private String coursetime;
	private Integer hours;
	
	private String title;//报表标题

	public static DksbFilter fromJson(String json) {
		return WxCpGsonBuilder.create().fromJson(json, DksbFilter.class);
	}

	public String toJson() {
		return WxCpGsonBuilder.create().toJson(this);
	}


}